/**
 * 
 */
package com.designpattern.design.strategy;

/**
 * @author zhangyang
 *
 */
public class DuckTest {
public static void main(String[] args) {
	
}
}

abstract class Duck{
	public void fly() {
		System.out.println("鸭子能飞");
	}
	
	public void shout() {
		System.out.println("鸭子能叫");
	}
	public void swim() {
		System.out.println("鸭子能游泳");
	}
	public abstract void display(); 
}

class BeijingDuck extends Duck{

	@Override
	public void display() {
		// TODO Auto-generated method stub
		System.out.println("这是北京鸭");
	}

	@Override
	public void fly() {
		// TODO Auto-generated method stub
		System.out.println("北京鸭不会游泳");
	}
		
}

class ToyDuck extends Duck{

	@Override
	public void display() {
		// TODO Auto-generated method stub
		System.out.println("这是玩具鸭");
	}

	@Override
	public void fly() {
		// TODO Auto-generated method stub
		System.out.println("玩具鸭不会飞");
	}

	@Override
	public void shout() {
		// TODO Auto-generated method stub
		System.out.println("玩具鸭不会叫");
	}

	@Override
	public void swim() {
		// TODO Auto-generated method stub
		System.out.println("玩具鸭不会游泳");
	}
	
	
}